import axios from "axios";

/**
 * 封装axios 发送get请求
 * @param url  '/api/user'
 * @param params{
 *     id:123456
 * }
 */
export function doGet(url, params) {
    return axios.get(url, {
        params: params
    })

}

/**
 *封装axios发送post请求
 * @param url 'api/user'
 * @param data{
 *     firstName:firstname
 *
 * }
 */
export function doPost(url, data) {
   return  axios.post(url, data)
}